<!--
 * @Author: ChunLai
 * @Date: 2023-08-03 10:42:15
 * @LastEditTime: 2025-09-04 17:39:12
 * @Description: 核保状态显示
 * @FilePath: \02.bldinsure\src\views\sign\components\InsureStatus.vue
-->
<template>
  <div class="mode1" v-if="insureFlag">
    <div class="flex">
      <div class="w14">
        <img :src="`${imgUrlPath}/icons/dot2.png`" />
      </div>
      <div class="mode1_value">{{ insureFlag | orderStatusName }}</div>
    </div>
    <div class="flex">
      <div class="w14 mode1dot">
        <img :src="`${imgUrlPath}/icons/dot2.png`" />
      </div>
      <div class="mode1_v2">{{ insureMsg }}</div>
    </div>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  name: "InsureStatus",
  data() {
    return {};
  },
  components: {},
  computed: {
    ...mapGetters({
      insureMsg: "insert/insureMsg",
      insureFlag: "insert/insureFlag",
    }),
  },
  watch: {},
  created() {},
  mounted() {},
  methods: {
    initModule() {
      this.$store
        .dispatch("apis/comAdminApiRequest", {
          apiParams: this.apiComParams,
          apiName: "orderStatus",
          toast: true,
        })
        .then((data) => {
          this.$store.commit("insert/SET_INSURE_FLAG", {
            code: data.orderStatus || "",
            msg: data.orderRemark || "",
          });
        });
    },
  },
};
</script>

<style lang="less" scoped>
.mode1 {
  padding: 10px 12px 17px 12px;
  background: #ffffff;

  .mode1_value {
    font-size: 15px;
    color: #343434;
    font-weight: 600;
    margin-left: 12px;
    font-family: MiSans;
  }
  .w14 {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    &.mode1dot {
      margin-top: 17px;
      position: relative;
      z-index: 2;
      &::after {
        content: "";
        position: absolute;
        left: 6.5px;
        top: -30px;
        // bottom: 30px;
        height: 36px;
        width: 1px;
        background-color: #ff8d1a;
      }
    }
  }

  .mode1_v2 {
    width: calc(100% - 26px);
    color: #242424;
    font-weight: 400;
    padding: 10px;
    line-height: 1.5;
    border-radius: 0px 10px 10px 10px;
    background: #fff4e8;
    margin-left: 12px;
    margin-top: 8px;
  }
}
</style>
